function LoadKotaAutoComplete(_site_url,idtext,idhidden) {
	
	$(idtext).autocomplete(_site_url + "/admin/ckota/get_jsonlist", 
	{
		dataType : "json",
		formatItem: false,
		retrieveComplete : function(data){
			if(data!="0"){
				return data;
			}
		},
		
		onItemSelect : function(li, row) {
			$(idhidden).val(row[1]);	
		}
	});
}

function LoadKabupatenAutoComplete(_site_url,idtext,idhidden) {
	
	$(idtext).autocomplete(_site_url + "/admin/ckabupaten/get_jsonlist", 
	{
		dataType : "json",
		formatItem: false,
		retrieveComplete : function(data){
			if(data!="0"){
				return data;
			}
		},
		
		onItemSelect : function(li, row) {
			$(idhidden).val(row[1]);	
		}
	});
}


function LoadProvinsiAutoComplete(_site_url,idtext,idhidden) {
	
	$(idtext).autocomplete(_site_url + "/admin/cprovinsi/get_jsonlist", 
	{
		dataType : "json",
		formatItem: false,
		retrieveComplete : function(data){
			if(data!="0"){
				return data;
			}
		},
		
		onItemSelect : function(li, row) {
			$(idhidden).val(row[1]);	
		}
	});
}

function LoadJbayarAutoComplete(_site_url,idtext,idhidden) {
	
	$(idtext).autocomplete(_site_url + "/admin/jbayar/get_jsonlist", 
	{
		dataType : "json",
		formatItem: false,
		retrieveComplete : function(data){
			if(data!="0"){
				return data;
			}
		},
		
		onItemSelect : function(li, row) {
			$(idhidden).val(row[1]);	
		}
	});
}


function LoadAplikasiAutoComplete(_site_url,idtext,idhidden,run_if) {
	
	$(idtext).autocomplete(_site_url + "/admin/caplikasi/get_jsonlist", 
	{
		dataType : "json",
		formatItem: false,
		retrieveComplete : function(data){
			if(data!="0"){
				return data;
			}
		},
		
		onItemSelect : function(li, row) {
			$(idhidden).val(row[1]);	
			if(run_if!=null){
				eval(run_if);
			}
		}
	});
}
